package com.pk.platform.business.data.dao.impl;

import java.util.ArrayList;
import java.util.List;

import com.pk.platform.business.core.dao.impl.GenericDaoImpl;
import com.pk.platform.business.data.dao.IMasterDataDao;
import com.pk.platform.util.StringConverter;

public class MasterDataDaoImpl extends GenericDaoImpl implements IMasterDataDao {

	public int queryEmployeeCountByNum(String num, String id) {
		List<Object> param = new ArrayList<Object>();
		String sql = "select count(id) from d_employee where employeeNum = ?";
		param.add(num);
		if(StringConverter.isNotNull(id))
		{
			sql += " and id <> ?";
			param.add(id);
		}
		return this.getSjt().queryForInt(sql, param.toArray());
	}

}
